package com.ys.entity.purchase;
import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.Table;
import com.alibaba.fastjson.annotation.JSONField;
import com.ys.annotation.YsField;
import com.ys.entity.base.BaseEntity;
/**
*/
@Table(name="TCG_PurchaseContractItem", catalog="Id")
public class TcgPurchaseContractItem extends BaseEntity<TcgPurchaseContractItem> {

	@YsField(nameDataBase="Id", nameJava="id", typeDataBase="bigint")
	private Long id;
	@YsField(nameDataBase="Pbid", nameJava="pbid", typeDataBase="varchar")
	private String pbid;
	@YsField(nameDataBase="OrderProductComponentId", nameJava="orderProductComponentId", typeDataBase="bigint")
	private Long orderProductComponentId;
	@YsField(nameDataBase="SubBomNumber", nameJava="subBomNumber", typeDataBase="int")
	private Integer subBomNumber;
	@YsField(nameDataBase="SubPurchaseNum", nameJava="subPurchaseNum", typeDataBase="int")
	private Integer subPurchaseNum;
	@YsField(nameDataBase="SubPurchasePrice", nameJava="subPurchasePrice", typeDataBase="decimal")
	private BigDecimal subPurchasePrice;
	@YsField(nameDataBase="PurchaseTotalPrice", nameJava="purchaseTotalPrice", typeDataBase="decimal")
	private BigDecimal purchaseTotalPrice;
	@YsField(nameDataBase="SubPaymentNum", nameJava="subPaymentNum", typeDataBase="int")
	private Integer subPaymentNum;
	@YsField(nameDataBase="SubWarehousingNum", nameJava="subWarehousingNum", typeDataBase="int")
	private Integer subWarehousingNum;
	@YsField(nameDataBase="SubWriteOffNum", nameJava="subWriteOffNum", typeDataBase="int")
	private Integer subWriteOffNum;
	@YsField(nameDataBase="SubPreWarehousingNum", nameJava="subPreWarehousingNum", typeDataBase="int")
	private Integer subPreWarehousingNum;
	@YsField(nameDataBase="SubPaymentState", nameJava="subPaymentState", typeDataBase="tinyint")
	private Integer subPaymentState;
	@YsField(nameDataBase="SubWarehousingState", nameJava="subWarehousingState", typeDataBase="tinyint")
	private Integer subWarehousingState;
	@YsField(nameDataBase="SubWriteOffState", nameJava="subWriteOffState", typeDataBase="tinyint")
	private Integer subWriteOffState;
	@YsField(nameDataBase="CancelState", nameJava="cancelState", typeDataBase="tinyint")
	private Integer cancelState;
	@YsField(nameDataBase="Status", nameJava="status", typeDataBase="tinyint")
	private Integer status;
	@JSONField(format = "yyyy-MM-dd HH:mm:ss")
	@YsField(nameDataBase="CreateTime", nameJava="createTime", typeDataBase="datetime")
	private Date createTime;
	@JSONField(format = "yyyy-MM-dd HH:mm:ss")
	@YsField(nameDataBase="UpdateTime", nameJava="updateTime", typeDataBase="datetime")
	private Date updateTime;

	public Long getId() {
		return id;
	}
	public TcgPurchaseContractItem setId(Long id) {
		this.id = id;
		return this;
	}
	public String getPbid() {
		return pbid;
	}
	public TcgPurchaseContractItem setPbid(String pbid) {
		this.pbid = pbid;
		return this;
	}
	public Long getOrderProductComponentId() {
		return orderProductComponentId;
	}
	public TcgPurchaseContractItem setOrderProductComponentId(Long orderProductComponentId) {
		this.orderProductComponentId = orderProductComponentId;
		return this;
	}
	public Integer getSubBomNumber() {
		return subBomNumber;
	}
	public TcgPurchaseContractItem setSubBomNumber(Integer subBomNumber) {
		this.subBomNumber = subBomNumber;
		return this;
	}
	public Integer getSubPurchaseNum() {
		return subPurchaseNum;
	}
	public TcgPurchaseContractItem setSubPurchaseNum(Integer subPurchaseNum) {
		this.subPurchaseNum = subPurchaseNum;
		return this;
	}
	public BigDecimal getSubPurchasePrice() {
		return subPurchasePrice;
	}
	public TcgPurchaseContractItem setSubPurchasePrice(BigDecimal subPurchasePrice) {
		this.subPurchasePrice = subPurchasePrice;
		return this;
	}
	public BigDecimal getPurchaseTotalPrice() {
		return purchaseTotalPrice;
	}
	public TcgPurchaseContractItem setPurchaseTotalPrice(BigDecimal purchaseTotalPrice) {
		this.purchaseTotalPrice = purchaseTotalPrice;
		return this;
	}
	public Integer getSubPaymentNum() {
		return subPaymentNum;
	}
	public TcgPurchaseContractItem setSubPaymentNum(Integer subPaymentNum) {
		this.subPaymentNum = subPaymentNum;
		return this;
	}
	public Integer getSubWarehousingNum() {
		return subWarehousingNum;
	}
	public TcgPurchaseContractItem setSubWarehousingNum(Integer subWarehousingNum) {
		this.subWarehousingNum = subWarehousingNum;
		return this;
	}
	public Integer getSubWriteOffNum() {
		return subWriteOffNum;
	}
	public TcgPurchaseContractItem setSubWriteOffNum(Integer subWriteOffNum) {
		this.subWriteOffNum = subWriteOffNum;
		return this;
	}
	public Integer getSubPreWarehousingNum() {
		return subPreWarehousingNum;
	}
	public TcgPurchaseContractItem setSubPreWarehousingNum(Integer subPreWarehousingNum) {
		this.subPreWarehousingNum = subPreWarehousingNum;
		return this;
	}
	public Integer getSubPaymentState() {
		return subPaymentState;
	}
	public TcgPurchaseContractItem setSubPaymentState(Integer subPaymentState) {
		this.subPaymentState = subPaymentState;
		return this;
	}
	public Integer getSubWarehousingState() {
		return subWarehousingState;
	}
	public TcgPurchaseContractItem setSubWarehousingState(Integer subWarehousingState) {
		this.subWarehousingState = subWarehousingState;
		return this;
	}
	public Integer getSubWriteOffState() {
		return subWriteOffState;
	}
	public TcgPurchaseContractItem setSubWriteOffState(Integer subWriteOffState) {
		this.subWriteOffState = subWriteOffState;
		return this;
	}
	public Integer getCancelState() {
		return cancelState;
	}
	public TcgPurchaseContractItem setCancelState(Integer cancelState) {
		this.cancelState = cancelState;
		return this;
	}
	public Integer getStatus() {
		return status;
	}
	public TcgPurchaseContractItem setStatus(Integer status) {
		this.status = status;
		return this;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public TcgPurchaseContractItem setCreateTime(Date createTime) {
		this.createTime = createTime;
		return this;
	}
	public Date getUpdateTime() {
		return updateTime;
	}
	public TcgPurchaseContractItem setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
		return this;
	}

	public static TcgPurchaseContractItem tcgPurchaseContractItem(
		String pbid,
		Long orderProductComponentId,
		Integer subBomNumber,
		Integer subPurchaseNum,
		BigDecimal subPurchasePrice,
		BigDecimal purchaseTotalPrice,
		Integer subPaymentNum,
		Integer subWarehousingNum,
		Integer subWriteOffNum,
		Integer subPreWarehousingNum,
		Integer subPaymentState,
		Integer subWarehousingState,
		Integer subWriteOffState,
		Integer cancelState,
		Integer status
			) {
		TcgPurchaseContractItem entity = new TcgPurchaseContractItem();
		entity.setPbid(pbid);
		entity.setOrderProductComponentId(orderProductComponentId);
		entity.setSubBomNumber(subBomNumber);
		entity.setSubPurchaseNum(subPurchaseNum);
		entity.setSubPurchasePrice(subPurchasePrice);
		entity.setPurchaseTotalPrice(purchaseTotalPrice);
		entity.setSubPaymentNum(subPaymentNum);
		entity.setSubWarehousingNum(subWarehousingNum);
		entity.setSubWriteOffNum(subWriteOffNum);
		entity.setSubPreWarehousingNum(subPreWarehousingNum);
		entity.setSubPaymentState(subPaymentState);
		entity.setSubWarehousingState(subWarehousingState);
		entity.setSubWriteOffState(subWriteOffState);
		entity.setCancelState(cancelState);
		entity.setStatus(status);
		return entity;
	}
}